package cn.shop.cloud.common;

/**
 * @program: shop-parent
 * @ClassName CodeMsg
 * @description:
 * @author: Mokio
 * @create: 2024−12-23 21:29
 * @Version 2024 2.2 ; jdk1.8.0_181
 **/
public class CodeMsg {

    // 状态码
    private Integer code;
    // 提示信息
    private String msg;

    // 定义两个初始空属性错误，这两个错误没有涉及到具体业务场景，所以直接定义在CodeMsg类中
    public static  final  CodeMsg ACCOUNT_EMPTY_ERROR=new CodeMsg(500001,"账号不能为空");
    public static  final  CodeMsg PASSWORD_EMPTY_ERROR=new CodeMsg(500002,"密码不能为空");
    // 后边一定是要根据不同的业务场景来定义不同的错误信息的

    // 有参构造
    public CodeMsg(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    //getter setter
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
